#!/usr/bin/perl -c

package MooseX::CLI::Option::Help;

use Smart::Comments '####';  # assert

use Any::Moose '::Role';

requires qw(run show_help);


use constant::boolean;

use File::Basename ();
use Pod::Usage ();
use Pod::Escapes ();


has 'help'  => (
    is      => 'ro',
    isa     => 'Bool',
    default => FALSE,
    traits  => [ 'Getopt' ],
);


before 'run' => sub {
    my $self = shift;
    return unless $self->help;

    $self->show_help;
};


1;
